home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / include / dos / dosextens.h < prev    next >
C/C++ Source or Header  |  1996-10-10  |  5KB  |  186 lines

  1. #ifndef _DOS_DOSEXTENS_H_
  2. #define _DOS_DOSEXTENS_H_
  3.  
  4. #include <exec/tasks.h>
  5. #include <exec/ports.h>
  6. #include <exec/libraries.h>
  7. #include <exec/semaphores.h>
  8. #include <devices/timer.h>
  9. #include <exec/interrupts.h>
  10. #include <dos/dos.h>
  11.  
  12. struct DosLibrary
  13. {
  14.     /* No public fields in there */
  15.     struct Library dl_lib;
  16.     struct ErrorString *dl_Errors;
  17.     struct timerequest *dl_TimeReq;
  18.     struct Library *dl_UtilityBase;
  19.     struct Library *dl_IntuitionBase;
  20.     struct SignalSemaphore dl_DosListLock;
  21.     struct DosList *dl_DevInfo;
  22.     struct ExecBase *dl_SysBase;
  23.     BPTR dl_SegList;
  24.     struct Device *dl_NulHandler;
  25.     struct Unit *dl_NulLock;
  26.  
  27.     struct SignalSemaphore dl_LDSigSem;
  28.     struct Interrupt dl_LDHandler;
  29.     APTR dl_LDOpenLibrary;
  30.     APTR dl_LDOpenDevice;
  31.     struct Process *dl_LDDemon;
  32.     STRPTR dl_LDName;
  33.     struct Process *dl_LDCaller;
  34.     APTR dl_LDPtr;
  35.     LONG dl_LDReturn;
  36.  
  37.     ULONG dl_ProcCnt;
  38.     ULONG dl_Flags;
  39. };
  40.  
  41. /* dl_Flags values */
  42. #define RNF_WILDSTAR 0x1000000    /* Activate '*' as wildcard character */
  43.  
  44. struct CommandLineInterface
  45. {
  46.     LONG cli_Result2;
  47.     BPTR cli_SetName;
  48.     BPTR cli_CommandDir;
  49.     LONG cli_ReturnCode;
  50.     BPTR cli_CommandName;
  51.     LONG cli_FailLevel;
  52.     BPTR cli_Prompt;
  53.     BPTR cli_StandardInput;
  54.     BPTR cli_CurrentInput;
  55.     BPTR cli_CommandFile;
  56.     LONG cli_Interactive;
  57.     LONG cli_Background;
  58.     BPTR cli_CurrentOutput;
  59.     LONG cli_DefaultStack;
  60.     BPTR cli_StandardOutput;
  61.     BPTR cli_Module;
  62. };
  63.  
  64. struct Process
  65. {
  66.     struct Task pr_Task;
  67.     struct MsgPort pr_MsgPort;
  68.     WORD pr_Pad;
  69.     BPTR pr_SegList;
  70.     LONG pr_StackSize;
  71.     APTR pr_GlobVec;
  72.     LONG pr_TaskNum;
  73.     BPTR pr_StackBase;
  74.     LONG pr_Result2;
  75.     BPTR pr_CurrentDir;
  76.     BPTR pr_CIS;
  77.     BPTR pr_COS;
  78.     APTR pr_ConsoleTask;
  79.     APTR pr_FileSystemTask;
  80.     BPTR pr_CLI;
  81.     APTR pr_ReturnAddr;
  82.     APTR pr_PktWait;
  83.     APTR pr_WindowPtr;
  84.     BPTR pr_HomeDir;
  85.     LONG pr_Flags;
  86.     void (*pr_ExitCode)();
  87.     LONG pr_ExitData;
  88.     STRPTR pr_Arguments;
  89.     struct MinList pr_LocalVars;
  90.     ULONG pr_ShellPrivate;
  91.     BPTR pr_CES;
  92. };
  93.  
  94. /* pr_Flags (all private) */
  95. #define    PRB_FREESEGLIST    0
  96. #define    PRB_FREECURRDIR    1
  97. #define    PRB_FREECLI    2
  98. #define    PRB_CLOSEINPUT    3
  99. #define    PRB_CLOSEOUTPUT    4
  100. #define    PRB_FREEARGS    5
  101. #define PRB_CLOSEERROR    6
  102. #define    PRF_FREESEGLIST    0x1
  103. #define    PRF_FREECURRDIR    0x2
  104. #define    PRF_FREECLI    0x4
  105. #define    PRF_CLOSEINPUT    0x8
  106. #define    PRF_CLOSEOUTPUT    0x10
  107. #define    PRF_FREEARGS    0x20
  108. #define PRF_CLOSEERROR    0x40
  109.  
  110. /* Dos list scanning and locking modes */
  111. #define LDB_READ    0
  112. #define LDB_WRITE    1
  113. #define LDB_DEVICES    2
  114. #define LDB_VOLUMES    3
  115. #define LDB_ASSIGNS    4
  116. #define LDB_ENTRY    5
  117. #define LDB_DELETE    6
  118. #define LDF_READ    0x1
  119. #define LDF_WRITE    0x2
  120. #define LDF_DEVICES    0x4
  121. #define LDF_VOLUMES    0x8
  122. #define LDF_ASSIGNS    0x10
  123. #define LDF_ENTRY    0x20
  124. #define LDF_DELETE    0x40
  125. #define LDF_ALL        0x1c
  126.  
  127. struct FileHandle
  128. {
  129.     APTR fh_Dummy1;
  130.     APTR fh_Dummy2;
  131.     APTR fh_Dummy3;
  132.     UBYTE *fh_Buf;
  133.     UBYTE *fh_Pos;
  134.     UBYTE *fh_End;
  135.     ULONG fh_Size;
  136.     ULONG fh_Flags;
  137.     struct Device *fh_Device;
  138.     struct Unit *fh_Unit;
  139.     LONG fh_Dummy4;
  140. };
  141.  
  142. /* Private fh_Flags values */
  143. #define FHF_WRITE    (~0ul/2+1)
  144. #define FHF_BUF        1
  145.  
  146. struct DosList
  147. {
  148.     struct DosList *dol_Next;    /* Private pointer to next entry */
  149.     LONG dol_Type;        /* Node types (see below) */
  150.     APTR dol_Dummy1;
  151.     LONG dol_Dummy2[7];
  152.  
  153.     /*
  154.     This field once was named dol_Name. It is now named dol_OldName
  155.     to give you a hint that something has changed. Additionally to the
  156.     old nasty BSTR there is now a new clean    STRPTR for the same purpose.
  157.     You may want to:
  158.     1. Change your sources to reflect this change thus getting rid of
  159.        all BCPL stuff or
  160.     2. just define dol_OldName to dol_Name before including this file
  161.        to stay downwards compatible.
  162.     */
  163.     BPTR dol_OldName;        /* Old field */
  164.     STRPTR dol_DevName;    /* New field (in fact pointing to the same string) */
  165.     struct Device *dol_Device;
  166.     struct Unit *dol_Unit;
  167. };
  168.  
  169. /* dol_Type type values. Given to MakeDosEntry(). */
  170. #define DLT_DEVICE    0    /* A real filesystem (or similar) */
  171. #define DLT_DIRECTORY    1    /* Just a simple assign */
  172. #define DLT_VOLUME    2    /* Volume node (for removable media) */
  173. #define DLT_LATE    3    /* Late binding assign (not yet) */
  174. #define DLT_NONBINDING    4    /* Nonbinding assign (not yet) */
  175.  
  176. /* Directory entry types */
  177. #define ST_ROOT        1    /* Root directory of filesystem */
  178. #define ST_USERDIR    2    /* Normal directory */
  179. #define ST_SOFTLINK    3    /* Soft link */
  180. #define ST_LINKDIR    4    /* Hard link to a directory */
  181. #define ST_FILE        -3    /* Normal file */
  182. #define ST_LINKFILE    -4    /* Hard link to a file */
  183. #define ST_PIPEFILE    -5    /* Special file */
  184.  
  185. #endif
  186.